<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title id="noticeTitle"></title>
    <%include("/app/resapi/mobilestyle.html"){}%>
</head>
<body style="overflow-y: auto;">
<ul class="m-grids-2">
    <li class="grids-item">
        <div class="grids-txt" style="text-align: left">点击次数:<span id="onclickCount"></span></div>
    </li>
    <li class="grids-item">
        <div class="grids-txt" style="text-align: right">公告类型:<span id="noticeType"></span></div>
    </li>
</ul>
<div style="background: #FFFFFF;padding: 10px;font-size: 14px;min-height: 200px;">
    <p id="content" align="left"></p>
</div>
<div class="mail-attachments" id="attach" style="margin-bottom: 50px;margin-top: 5px;margin-left: 5px;" align="left">
    <h4>
        <i class="fa fa-paperclip"></i> 附件： <span id="attachCount"></span>
    </h4>
    <div id="show_attach"></div>
</div>
<ul class="m-grids-2">
    <li class="grids-item">
        <div class="grids-txt" style="text-align: left">发布时间:<span id="sendTime"></span></div>
    </li>
    <li class="grids-item">
        <div class="grids-txt" style="text-align: right">发布人:<span id="createUser"></span></div>
    </li>
</ul>
<%include("/app/resapi/mobilejs.html"){}%>
<script type="text/javascript">
    var noticeId = "${parameter.noticeId}";
</script>
<script type="text/javascript" src="/module/fileupload/ajaxfileupload.js"></script>
<script type="text/javascript" src="/module/fileupload/mobilefileupload.js"></script>
<script type="text/javascript">

    $(function () {
        bindData()
    });

    function bindData() {
        $.ajax({
            url: "/ret/noticeget/getMobileNoticeInfo",
            type: "post",
            dataType: "json",
            data: {
                noticeId: noticeId
            },
            success: function (data) {
                if (data.status == "500") {
                    console.log(data.msg);
                } else if (data.status == "100") {
                    layer.msg(data.msg);
                } else {
                    console.log(data.list)
                    for (var name in data.list) {
                        if (name == "attach") {
                            $("#attach").attr("data_value", data.list.attach);
                            createAttach("attach", data.list.attachPriv);
                        } else if (name == "noticeType") {
                            $("#" + name).html(getCodeClassName(data.list.noticeType, "notice"));
                        } else if (name == "createUser") {
                            $("#" + name).html(getUserNameByStr(data.list.createUser));
                        } else {
                            $("#" + name).html(data.list[name]);
                        }
                    }
                }
            }
        })
    }
</script>
</body>
</html>
